require.config({
	paths:{
		jquery:"jquery.min",
		bootstrap:'bootstrap.min',
		moment: 'moment',
		daterangepicker: 'daterangepicker',
		commonObj:'commonObj'
	}
});
require(['bootstrap','moment','daterangepicker','commonObj'],
	function(bootstrap,moment,daterangepicker,commonObj){
		commonObj.addClass();
		commonObj.shiftSet();
		$(document).click(function(){
			$('.select_nurser_ui').hide();
			$('.select_nurserWC_ui').hide();
		});

		//  全选
		$('#allSelect').change(function(){
			if($(this).is(':checked')){
				console.log('ok');
				$('#nurserBox').find('input').prop({checked:true});
			}else{
				console.log('no');				
				$('#nurserBox').find('input').prop({checked:false});
			}
		})

		//模块一下一步
		$('#mod1Next').click(function(){
			$('#cbpz').css({'display':'block'});
		})

		//常班配置下一步
		$('#cbpzNext').click(function(){
			$('#pbbzpz').css({'display':'block'});
			$('#lbzypz').css({'display':'block'});
		})

		//daterangepicker
		$('#reservation').daterangepicker({
		    "startDate": "2017-01-07",
		    "endDate": "2017-02-20",
		    locale: {
            format: 'YYYY-MM-DD'
        },
		}, function(start, end, label) {
		  console.log("New date range selected: ' + start.format('YYYY-MM-DD') + ' to ' + end.format('YYYY-MM-DD') + ' (predefined range: ' + label + ')");
		});

});
